package cn.idongjia.video;

import cn.idongjia.log.Log;
import cn.idongjia.log.LogFactory;
import cn.idongjia.mq.consumer.Consumer;
import cn.idongjia.mq.topic.View;

import java.util.HashMap;
import java.util.Map;

public class VideoEncodeManager {
    private static final Log log = LogFactory.getLog(VideoEncodeManager.class);
    private static Map<String,String> config=VedioConfigLoader.getInstance().loadConfig();
    public static void main(String[] args) {
        log.info("订阅视频转码消息开启....");
        Consumer consumer = new Consumer();
        consumer.setClusterAddr(config.get(Constant.MQHOST));
        consumer.setConsumerGroup(config.get(Constant.VIEWGROUP));
        Map map = new HashMap();
        map.put(View.upload.getTopic(), new VideoEncode());
        consumer.setHandler(map);
        consumer.initBean();
    }
}